this._updateNoMessagesLabel();
this._contextMenu = new MessageTrayContextMenu(this);
+ this._contextMenuManager = new PopupMenu.PopupMenuManager({ actor: this.actor });
+ this._contextMenuManager.addMenu(this._contextMenu);
let clickAction = new Clutter.ClickAction();
this.actor.add_action(clickAction);
let button = action.get_button();
if (button == 3)
this._openContextMenu();
- if (button == 1 && this._contextMenu.isOpen)
- this._grabHelper.ungrab({ actor: this._contextMenu.actor });
}));
clickAction.connect('long-press', Lang.bind(this, function(action, actor, state) {
_openContextMenu: function () {
let [x, y, mask] = global.get_pointer();
this._contextMenu.setPosition(Math.round(x), Math.round(y));
- this._grabHelper.grab({ actor: this._contextMenu.actor,
- onUngrab: Lang.bind(this, function () {
- this._contextMenu.close(BoxPointer.PopupAnimation.FULL);
- })
- });
this._contextMenu.open(BoxPointer.PopupAnimation.FULL);
},